//
//  DataBaseSimple.h
//  SimpleDemo
//
//  Created by 毛志 on 14-2-18.
//  Copyright (c) 2014年 maozhi. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMDatabase.h"
#import "QFBookModel.h"

@interface DataBaseSimple : NSObject

+ (DataBaseSimple *)sharedDataBase;

- (BOOL)insertDataToDataBase:(QFBookModel *)model andKey:(NSInteger)key;
- (BOOL)deleteDataFromDataBaseForKey:(NSInteger)key;
- (BOOL)updateDataFromDataBase:(QFBookModel *)model andKey:(NSInteger)key;

- (QFBookModel *)selectFromDataBaseForKey:(NSInteger)key;
- (NSMutableArray *)selectAllDataFromDataBase;

// 清空table表
- (BOOL)dropTable;
- (BOOL)deleteTable;


@end
